package com.lemon.components.ant.project.makers;

import org.apache.commons.lang3.StringUtils;

import com.lemon.components.ant.project.beans.ControllerInfo;
import com.lemon.components.ant.util.PathUtil;
import com.lemon.components.ant.util.TemplateUtil;

public class Controller4RestMaker {

	public static void make(ControllerInfo controllerInfo) {
		String template = controllerInfo.getServiceInfo().getProjectInfo().getTemplatePath();
		String build = PathUtil.getInstance(
					controllerInfo.getServiceInfo().getProjectInfo()
				).getControllerPackagePath().getPath()+"boss";
		
		TemplateUtil.getInstance(template).build("/maven-project-template/controller/RestControllerBossTemplate.java", 
				build.toLowerCase() +"/"+ StringUtils.capitalize(controllerInfo.getServiceInfo().getServiceName()) +"BossController.java", controllerInfo);
	}
}
